package cn.tedu.boot052.mapper;

import cn.tedu.boot052.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
  @Select("select password from user where username=#{username}")
    User selectByUsername(String username);

  //@Insert("insert into user values(null,#{username},#{password},#{nickname}") //错
  @Insert("insert into user values(null,#{username},#{password},#{nickname})")   //对
    void insert(User user);
}
